<div class="title">
	<span>Customers</span>
	<a href="<?php echo site_url('admin/add_customer');?>" class="ibtn add">Add Customer</a>
	<div class="clear">&nbsp;</div>
</div>




<?php flash(); // display flash data?>
<?php
	if(!empty($customers)){
		$tmpl = array ( 'table_open'  => '<table border="1" cellpadding="2" cellspacing="1" class="tbl-list" id="tbl-list">' );
		$this->table->set_heading('Username', 'Firstname', 'Lastname', 'Contact', 'Email', 'Action');
		$this->table->set_template($tmpl);
		
		foreach($customers as $v){
			$data = array(
					$v->username,
					$v->firstname,
					$v->lastname,
					$v->contact,
					$v->email,
					'<a href="'.site_url('admin/delete/customers/'.$v->id).'" class="btn-icon delete" title="Delete">Delete</a>
					<a href="'.site_url('admin/edit_customer/'.$v->id).'" class="btn-icon edit" title="Edit">Edit</a>
					<a href="'.site_url('admin/reset_pw/'.$v->id).'" class="btn-icon reset" title="Reset Password">Reset</a>
				
					'
			);
			$this->table->add_row($data);	
		}
		echo $this->table->generate();
	}
	else {
		echo '<div class="msg notice"><span></span><h5>Notice</h5>No customers available yet.</div>';	
	}
?>

